package com.tars.txappend.config;

import com.tars.txappend.interceptors.TxInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;

/**
 * @author: Franz 2022/3/20
 */
@Configuration
public class TxCongfig extends WebMvcConfigurationSupport {
    @Override
    protected void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new TxInterceptor()).addPathPatterns("/**");
        super.addInterceptors(registry);
    }
}
